<template>
  <el-row>
    <el-col :span="12">订单号</el-col>
    <el-col :span="12">{{ obj.orderNo }}</el-col>
    <el-col :span="12">下单时间</el-col>
    <el-col :span="12">{{ obj.orderTime | timeMF }}</el-col>
    <el-col :span="12">手机号</el-col>
    <el-col :span="12">{{ obj.phone }}</el-col>
    <el-col :span="12">收货人</el-col>
    <el-col :span="12">{{ obj.consignee }}</el-col>
    <el-col :span="12">收货地址</el-col>
    <el-col :span="12">{{ obj.deliverAddress}}</el-col>
    <el-col :span="12">送达时间</el-col>
    <el-col :span="12">{{ obj.deliveryTime  | timeMF  }}</el-col>
    <el-col :span="12">订单号</el-col>
    <el-col :span="12">{{ obj.remarks }}</el-col>
    <el-col :span="12">订单金额</el-col>
    <el-col :span="12">{{ obj.orderAmount }}</el-col>
    <el-col :span="12">订单状态</el-col>
    <el-col :span="12">{{ obj.orderState }}</el-col>
  </el-row>
</template>

<script>
import { api_detail } from "../../api/order";
import moment from "moment";
export default {
  filters: {
    timeMF(val) {
      if (val == "0000-00-00 00:00:00") {
        return "时间不正确";
      } else {
        return moment(val).format("YYYY-MM-DD hh:mm:ss");
      }
    },
  },
  data() {
    return {
      obj: {},
    };
  },
  mounted() {
    this.queryone();
  },
  methods: {
    async queryone() {
      let rst = await api_detail({ id: this.$route.query.id });
      this.obj = rst.data;
      console.log(rst)
    },
  },
};
</script>

<style lang="less" scoped>
</style>